package com.itbbj.principle.d2_LSP.demo1;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: jack_yang
 * @Date: 2024/5/6
 * @Description: addition and subtraction
 */
public class Brid {


    protected double runSpeed;
    protected double flySpeed;
    public void setRunSpeed(double runSpeed) {
        this.runSpeed = runSpeed;
    }

    public void setFlySpeed(double flySpeed) {
        this.flySpeed = flySpeed;
    }
    public double  calcuFlyTime(double distance){
        return distance/flySpeed;
    }
    public double calcuRunTime(double distance){
        return distance/runSpeed;
    }

}
